//
// Created by v on 2021/8/7.
//

#ifndef JKLIBS_CM_IMAGE_QUALITY_H
#define JKLIBS_CM_IMAGE_QUALITY_H

#include <iostream>
#include <vector>
#include "opencv2/opencv.hpp"

class CMImageQuality
{
public:
    CMImageQuality(const char *img_file);

    int checkFuzzy();

    int checkKeepOut();

    int simpleTest();

protected:
    void maskDepth(cv::Mat &image, cv::Mat& th, int throld=1000);
    std::vector<std::vector<cv::Point> > findArea(cv::Mat &depth, int thresh = 20, int max_thresh = 255, int area = 500);

private:
    std::string   m_file;
};


#endif //JKLIBS_CM_IMAGE_QUALITY_H
